import request from '@/utils/request'

// 查询设备维护信息列表
export function listMaintenance(query) {
  return request({
    url: '/mes/maintenance/list',
    method: 'get',
    params: query
  })
}

// 查询设备维护信息详细
export function getMaintenance(maintenanceId) {
  return request({
    url: '/mes/maintenance/' + maintenanceId,
    method: 'get'
  })
}

// 新增设备维护信息
export function addMaintenance(data) {
  return request({
    url: '/mes/maintenance',
    method: 'post',
    data: data
  })
}

// 修改设备维护信息
export function updateMaintenance(data) {
  return request({
    url: '/mes/maintenance',
    method: 'put',
    data: data
  })
}

// 删除设备维护信息
export function delMaintenance(maintenanceId) {
  return request({
    url: '/mes/maintenance/' + maintenanceId,
    method: 'delete'
  })
}
